const express = require("express");
const path = require("path");
const cors = require("cors");
const jwt = require("jwt");
const app = express();
app.listen("3000", () => console.log("服务器准备就绪"));
app.use(cors());
app.use(express.urlencoded({ extended: false }));
// 解析token字符串，控制某些接口必须登陆才可以使用
// 加载路由模块
app.use("/api", require(path.join(__dirname, "routers", "login")));
app.use("/my/article", require(path.join(__dirname, "routers", "category")));
app.use("/my/article", require(path.join(__dirname, "routers", "article")));
app.use("/my", require(path.join(__dirname, "routers", "user")));
